/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.qtags.xdoc;

import java.io.IOException;

import java.net.URL;

import org.generama.JellyTemplateEngine;
import org.generama.MetadataProvider;
import org.generama.Plugin;
import org.generama.QDoxCapableMetadataProvider;
import org.generama.WriterMapper;

import org.generama.tests.AbstractXMLGeneratingPluginTestCase;

import org.xdoclet.QDoxMetadataProvider;

/**
 *
 * @author Aslak Helles&oslash;y
 * @version $Revision: 332 $
 */
public class QTagXDocPluginTestCase extends AbstractXMLGeneratingPluginTestCase {
    protected URL getExpected() throws IOException {
        return getResourceRelativeToThisPackage("expected/FooBar.xml");
    }

    protected MetadataProvider createMetadataProvider() throws IOException {
        URL reader = getResourceRelativeToThisPackage("../impl/test/FooBarTag.java");
        return new QDoxMetadataProvider(reader);
    }

    protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper)
        throws Exception {
        QTagXDocPlugin result = new QTagXDocPlugin(new JellyTemplateEngine(),
                (QDoxCapableMetadataProvider) metadataProvider, writerMapper);
        result.setNamespace("foo");
        return result;
    }
}